﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LTSMZ.life.DAL;
using LTSMZ.life.Model;
using System.Data;

namespace LTSMZ.life.BLL
{
    public class StockBll
    {

        //实例化
        StockDal dal = new StockDal();

        /// <summary>
        /// 获取库存信息
        /// </summary>
        /// <returns></returns>
        public List<Stock> StockShow()
        {
            return dal.StockShow();
        }

        /// 下拉框显示
        /// </summary>
        /// <returns></returns>
        public List<Product> Selectpstorck()
        {
            return dal.Selectpstorck();
        }

        /// <summary>
        /// 添加库存信息
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        public int AddStock(Stock s)
        {
            return dal.AddStock(s);
        }
    
        /// <summary>
        /// 进货
        /// </summary>
        /// <param name="Jin"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public int JinStock(int Jin, int id)
        {
            return dal.JinStock(Jin, id);
        }
        /// <summary>
        /// 根据编号获取库存信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Stock Get_Stock(int id)
        {
            return dal.Get_Stock(id);
        }
    }
}
